//
//  LLT_LoginUserListCell_LXM.m
//  CoderLLT
//
//  Created by 刘晓萌 on 15/12/24.
//  Copyright © 2015年 刘晓萌. All rights reserved.
//

#import "LLT_LoginUserListCell_LXM.h"

@implementation LLT_LoginUserListCell_LXM

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}
- (IBAction)didClickRemoveButton:(UIButton *)sender {
    NSArray *dicArr = [[NSUserDefaults standardUserDefaults] arrayForKey:@"usersList"];
    NSMutableArray *arr = [NSMutableArray array];
    for (NSDictionary *dic in dicArr) {
        NSString *key = [dic allKeys][0];
        if ( ![key isEqualToString:self.label.text]) {
            [arr addObject:dic];
        }
    }
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"usersList"];
    [[NSUserDefaults standardUserDefaults] setObject:arr forKey:@"usersList"];
    
    if (self.reloadTable) {
        self.reloadTable();
    }
}

@end
